package net.zjitc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import lombok.Data;

/**
 * @author 毛钰深
 * @create 2022/2/1
 */
@Data
@TableName("sp_goods_attr")
public class GoodsAttr {
   @TableId(type = IdType.AUTO)
   private Integer id;
   private Integer goods_id;
   private Integer attr_id;
   private String attr_value;
   @JsonInclude(JsonInclude.Include.ALWAYS)
   private Double add_price;
   @JsonUnwrapped
   @TableField(exist = false)
   private Attribute attribute;

   public void setGoodsId(Integer goods_id) {
        this.goods_id = goods_id;
   }

   public void setAttrId(Integer attr_id) {
        this.attr_id = attr_id;
   }

   public void setAttrValue(String attr_value) {
        this.attr_value = attr_value;
   }

   public void setAddPrice(Double add_price) {
        this.add_price = add_price;
   }
}
